<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="qualomelhor.util.Util" %>
<%
	String locale = (String)session.getAttribute("LOCALE");
	String backgroundUrl = "/images/background/lblue164.gif";
%>

<!DOCTYPE html>
<html lang="en">
	<head>
		<title><%=Util.getConstant("Criar comparacao 2 Itens", locale)%></title>
		<meta charset="utf-8">
	    <meta name="author" content="Qual o Melhor Team">
		<meta name="title" content="<%=Util.getConstant("Criar comparacao 2 Itens", locale)%>">
		<meta http-equiv="expires" content="">
		<meta http-equiv="VW96.OBJECTTYPE" content="Internet">
		<meta name="rating" content="webmaster">
		<meta name="revisit-after" content="2 weeks">
	    <meta name="robots" content="nofollow">
	    <meta http-equiv="content-language" content="pt">
		<meta http-equiv="content-type" content="text/html; charset=UTF-8">
		<meta name="reply-to" content="admin@<%=request.getServerName().replace("www.", "")%>">
		<meta name="gwt:property" content="locale=<%=locale%>">
		<meta http-equiv="X-UA-Compatible" content="IE=9" >

	    <!--[if lt IE 9]>
    		<script src="//html5shim.googlecode.com/sin/trunk/html5.js"></script>
    	<![endif]-->

	    <link type="text/css" rel="stylesheet" href="/stylesheets/qualomelhor.css">
	    <link type="text/css" rel="stylesheet" href="/stylesheets/tipsy.css">
	    <link type="text/css" rel="stylesheet" href="/stylesheets/tipTip.css">
	    

		<!--[if IE 6]>
			<script src="/javascript/DD_belatedPNG.js"></script>
			<script>
	  			/* EXAMPLE */
  				DD_belatedPNG.fix('.png_bg');
  
		  		/* string argument can be any CSS selector */
  				/* .png_bg example is unnecessary */
  				/* change it to what suits you! */
			</script>
		<![endif]--> 
		<script type="text/javascript">
			<%@ include file="/javascript/qualomelhor.js" %>
		</script>

		<script type="text/javascript" src="/javascript/jquery-1.7.2.js"></script>
		<script type="text/javascript" src="/javascript/jquery.serialScroll-1.2.2-min.js"></script>
		<script type="text/javascript" src="/javascript/jquery.scrollTo-1.4.2-min.js"></script>
		<script type="text/javascript" src="/javascript/jquery.tipsy.js"></script>
		<script type="text/javascript" src="/javascript/jquery.tipTip.minified.js"></script>
		<script src="/javascript/canvas-to-blob.min.js"></script>

		<script type="text/javascript">
			function inicio() {
				resize();
				setGameBackground("<%=backgroundUrl%>");
				$(function(){
					//$(".comboBoxPerguntaSemSeta").tipsy();
					$(".comboBoxPerguntaSemSeta").tipTip();
					//alert("jquery tipsy");
				});
				//alert("jquery tipsy ok");
			}

			function setGameBackground(imageUrl) {
				//alert("imageUrl = " + imageUrl);
				if (window.verificaGameCarregado_j) {
					//alert("verificaGameCarregado_j carregado.." + window.verificaGameCarregado_j());
					if (window.verificaGameCarregado_j()) {
						window.setBackground_j(imageUrl);
						setTimeout("aguardaBackgroundCarregado();", 1000);
						//alert("executou!");
					} else {
						setTimeout("setGameBackground('" + imageUrl + "');", 2000);
					}
				} else {
					setTimeout("setGameBackground('" + imageUrl + "');", 2000);
				}
			}

			function aguardaBackgroundCarregado() {
				if (window.verificaBackgroundCarregado_j()) {
					window.setVisible_j(true);
					document.getElementById("divAbaixoTitulo").style.display = "block";
				} else {
					setTimeout("aguardaBackgroundCarregado();", 200);
				}
			}

			window.aplicarToolTip = function () {
				//alert("vai aplicar tooltip...");
				$(function(){
					//$("#lbProd2").tipTip();
					$("#txtPerguntaPersonalizada").tipTip({defaultPosition: "top"});
					//$("#txtBuscaProd1").tipTip({activation: "focus", defaultPosition: "top"});
					//$("#txtBuscaProd2").tipTip({activation: "focus", defaultPosition: "top"});
					$("#lbProduto1").tipTip({defaultPosition: "top"});
					$("#lbProduto2").tipTip({defaultPosition: "top"});
				});
				//alert("tooltip ok");
			}

			window.removerToolTip = function() {
				//alert("vai remover tooltip...");
				//$(".comboBoxPerguntaSemSeta").live('focus', function () {
				//		$(this).unbind('focus');
				//});
				$(".comboBoxPerguntaSemSeta").unbind("hover");
				alert("tooltip removido...");
			}

			function teste() {
				//alert("teste");
				window.removerToolTip();
			}
		</script>
	</head>

	<body id="mybody" style="width: 100%; background-image: url('<%=backgroundUrl%>'); background-repeat: repeat;" onload="inicio();">

		<header id="divHeader">
			<%@ include file="titulo.jsp" %>
		</header>

			<%
				String tipo = "2";
				if (request.getParameter("tipo") != null) {
					tipo = request.getParameter("tipo");
				}
				String result = "";
				System.out.println("tipo em comparacao.jsp = [" + tipo + "]");
				if (tipo.equals("1")) {
					result = "comparacao1Coisa.jsp";
				} else if (tipo.equals("2")) {
					result = "comparacao2Coisas.jsp";
				} else if (tipo.equals("3")) {
				    result = "comparacao3Coisas.jsp";
				} else if (tipo.equals("4")) {
				    result = "testeGame.jsp";
				} else if (tipo.equals("5")) {
				    result = "detalheComparacao.jsp";
				} else {
			    	result = "erro.jsp";
			    }
			%>
			<jsp:include page="<%=result%>" flush="true"/>
		<!-- 
		<button style="position: absolute; top: 500px;" class="comboBoxPerguntaSemSeta" onclick="teste();" title="remover tooltip teste teste teste . blb la la">remover tooltip</button>
		 -->
	</body>
</html>